package com.hwtx.form.domain.handle.core;

import com.hwtx.form.domain.def.FormConfigExt;
import com.hwtx.form.domain.def.FormDetailExt;
import com.hwtx.form.domain.def.meta.config.FormComponentConfig;
import com.hwtx.form.domain.handle.SelectItemsInfo;
import com.hwtx.form.domain.handle.datamodel.DataModel;
import com.hwtx.form.domain.handle.datamodel.DataModelRelate;
import com.hwtx.form.domain.permission.DataQueryInfo;
import io.geekidea.boot.system.vo.ProValueConfig;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Collection;
import java.util.List;
import java.util.Map;

@Data
public class QueryConfigInfo {
    Map<String, List<SelectItemsInfo.SelectItemInfo>> selectItems;
    List<RequestParam> filterListExtraItems;
    List<FormConfigExt.SearchConfig> searchConfigs;
    DataModel dataModel;
    List<DataModelRelate> dataModelRelates;
    Map<String, List<FormDetailExt.OperationCondition>> operationConditions;
    List<FormComponentConfig.ApiInvokeParam> invokeApiFields;
    List<DataQueryInfo.DataModelParamInfo> dataModelParams;

    @EqualsAndHashCode(callSuper = true)
    @Data
    public static class RequestParam extends ProValueConfig {
        private String paramName;
    }

    @EqualsAndHashCode
    @Data
    public static class OrGroupParam {
        List<Map<String, Collection<Object>>> groups;
    }
}